package com.zym.field_method08;

public class StudentTest {

    public static void main(String[] args) {
        //1.无参构造器 创建对象
        Student student = new Student();
//        student.setName("张三");
//        student.setAge(12);
//        student.setSchool("云南能源");
//        student.setMajor("软件技术");

        System.out.println(student.getInfo());
        //2.有两个参数的构造器 创建对象
        Student student2 = new Student("李四", 18);

        System.out.println(student2.getInfo());
        //3.有三个参数的构造器 创建对象

        Student student3 = new Student("王五", 17,
                "云南能源");

        System.out.println(student3.getInfo());
        //4.有四个参数的构造器 创建对象

        Student student4 = new Student("赵六", 20,
                "云南能源", "软件技术");

        System.out.println(student4.getInfo());
    }
}
